package com.fingard.dsp.bank.reqrespobj.auth;

import java.util.HashMap;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.xml.XmlTextReader;

public class ReqQryAuth extends RequestBase {
	/** 鉴权流水号 */
	public String askNumber;
	
	/** 鉴权类型 (01-身份认证, 02-卡信息认证) */
    public String authType; 
	
	public ReqQryAuth(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception{
		reqHeader = p_header;
		
		if(p_xmlReader.read(PATH_Detail)) {
			authType = p_xmlReader.readedXElement.getSingleTextNotNull("AuthType");
			askNumber = p_xmlReader.readedXElement.getSingleText("ReqSeqID"); 
		} else {
			throw new Exception("不存在节点：" + PATH_Detail);
		}
	}
	
	public ReqQryAuth(HashMap<String, String> p_hashParam, ReqRespHeader p_header) throws Exception{
		reqHeader = p_header;
		
		if(p_hashParam.containsKey("ReqSeqID")){
			askNumber = p_hashParam.get("ReqSeqID");
		}
		if(p_hashParam.containsKey("RdSeq")){
			askNumber = p_hashParam.get("RdSeq");
		}
		if (p_hashParam.containsKey("AuthType")) {
			authType = p_hashParam.get("AuthType");
		}
	}
}
